<template>
    <view class="query-area">
      <view class="flex">
        <view class="tprice item">
          现价≤<input class="input" type="text" v-model="queryInfo.tprice" />
        </view>
        <view class="curr_iss_amt item">
          剩余规模≤<input class="input" type="text" v-model="queryInfo.curr_iss_amt" />
        </view>
        <view class="premium_rt item">
          溢价率≤<input class="input" type="text" v-model="queryInfo.premium_rt"/>
        </view>
        <button type="primary" size="mini" class="button" @click="getDbLowReq">筛选</button>
      </view>
      <view class="toChangeStock" @click="toChangeStock">
        去一键换仓
      </view>
    </view>
    
</template>

<script>
  import { createNamespacedHelpers } from 'vuex'
  const { mapState, mapActions } = createNamespacedHelpers('indexPage')
  
  export default {
    computed: {
      ...mapState(['queryInfo'])
    },
    methods: {
      ...mapActions(['getDbLowReq']),
      toChangeStock () {
        uni.navigateTo({
          url: '/pages/stock/changeStock/index'
        })
      }
    }
  }
</script>

<style lang="scss">
  .flex {
    display: flex;
  }
  .query-area {
    width: 690rpx;
    margin: 30rpx 10rpx;
    padding: 30rpx 5rpx;
    overflow: hidden;
    font-size: 30rpx;
    box-shadow: 0 0 10rpx #333;
    border-radius: 10rpx;
    .button {
      margin: 0;
      font-size: 30rpx;
    }
  }
  .toChangeStock {
    float: right;
    margin-top: 30rpx;
    margin-right: 30rpx;
    color: blue;
  }
</style>
